import Opt from '@/components/dt/info/Opt.js'

class YearendColumn extends Opt {

  constructor() {
    super()
    this.build()
  }

  build() {
    this.createAll()
    this.opts.push(...this.all)
  }

  createAll() {
    this.all = [{
      type: 'index',
      title: '序号',
      minWidth: 50,
    },
    {
      field: 'workNo',
      minWidth: 100,
      header: {
        filter: {
          key: 'workNo',
          title: '工号',
          placeholder: '请输入人员工号',
          input: {}
        }
      }
    },
    {
      field: 'userName',
      minWidth: 100,
      header: {
        filter: {
          key: 'userName',
          title: '姓名',
          placeholder: '请输入人员姓名',
          input: {}
        }
      }
    },
    {
      field: 'jobStatusStr',
      minWidth: 100,
      header: {
        filter: {
          key: 'jobStatus',
          title: '当前状态',
          placeholder: '请选择当前状态',
          select: {
            key: 'jobStatus'
          }
        }
      }
    },
    {
      field: 'postName',
      title: '职位',
      minWidth: 150
    },
    {
      field: 'yearSettlementAmount',
      title: '年度已结奖金(元)',
      minWidth: 150,
      cell: {
        text: {
          type: 'number'
        }
      }
    },
    {
      field: 'shouldBonusAmount',
      title: '年底应付奖金(元)',
      minWidth: 150,
      cell: {
        text: {
          type: 'number'
        }
      }
    },
    {
      field: 'bonusPool',
      title: '年底计提奖金池(元)',
      minWidth: 150
    },
    {
      field: 'actualBonusAmount',
      title: '实发奖金(元)',
      minWidth: 150
    },
    {
      title: '操作',
      width: 100,
      fixed: 'right',
      cell: (item) => {
        return {
          btn: [{
            title: '查看明细',
            event: 'onDetail',
          }]
        }
      }
    }]
  }

}

export default YearendColumn